<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>羔羊论坛</title>
<link rel="icon" type="image/x-icon" href="img/sheep.ico" />
<link rel="stylesheet" type="text/css" href="css/userinfo.css" />
<style>
#vip{text-decoration:none;color:black;font-size:16px;font-weight:500}</style>
</head>
<body>
<%
	request.setCharacterEncoding("UTF-8");
	String username=(String)session.getAttribute("username");
	String role=(String)session.getAttribute("userrole");
	String status=(String)session.getAttribute("userstatus");
	String role_info=(role=="admin"||"admin".equals(role))?"管理员":"用户";
%>
<div id="t">
	<ul>
		<li><a href='index.jsp'>返回首页</a></li>
	</ul>
</div>

<div id="container">
	<div id="left">
	
		<h3>用户个人中心</h3>
		<br><span class="tit"><strong>用户信息</strong></span>
		<table>
			<tr>
				 <td>用户:</td>
				 <td><%=username %></td>
			 </tr>
			 <tr>
			     <td>身份:</td>
			     <td><%=role_info%></td>
			 </tr>
			 <tr>
			      <td>状态:</td>
			      <td><%=status%></td>
			 </tr>
		</table>
		<br>
		<span class="tit"><strong>个人操作</strong></span><br>
		<ul id="act">
		<%
			if("admin".equalsIgnoreCase(role))
			{
				out.println("<li><a href='cha_user.jsp' target='show'>查找用户</a></li>");
				out.println("<li><a href='MessageServlet?po=chajin' target='show'>查看禁帖</a></li>");
			}
		%>
				<li><a href="update_user.jsp" target="show">修改密码</a></li>
				<li><a href="fa_message.jsp" target="show">发布新帖</a></li>
				<li><a href="MessageServlet?po=mytie&username=<%=username %>" target="show">我的帖子</a></li>
				<li><a href="AnsMessageServlet?am=myans&username=<%=username %>" target="show">我的留言</a></li>
		</ul>
	</div>
	
	
	<div id="right">
		<iframe src="user_show.jsp" width="100%" height="100%" frameborder="0" scrolling="auto" name="show" id="show"></iframe>
	</div>
</div>


</body>
</html>